<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    <my-header></my-header>
    <my-body></my-body>
    <my-footer></my-footer>
</div>

<template id="my-body">
    <div>
        <ul>
            <li v-for="news in newsList">
                <a :href="news.id">{{news.title}}</a>
            </li>
        </ul>
        <p>hhhhh, ppp</p>
    </div>
</template>

<template id="my-footer">
    <div>
        <p> Copyright @ lisgorup 2018-07-21 </p>
    </div>
</template>
<script src="vue.js"></script>
<script>
    Vue.component('my-header', {
        template: `
            <div>
                <h1>This is header</h1>
            </div>`
    });
    Vue.component('my-body', {
        template: '#my-body',
        data() {
            return {
                newsList: [
                    {id: 1, title: '新闻第1条'},
                    {id: 2, title: '新闻第2条'},
                    {id: 3, title: '新闻第3条'},
                    {id: 4, title: '新闻第4条'},
                ]
            }
        }
    });
    Vue.component('my-footer', {
        template: '#my-footer'
    });

    let vm = new Vue({
        el: "#app",
        data: {}
    })
</script>
</body>
</html>